import aiohttp
import asyncio

headers={
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.62'
}

# proxy='http://localhost:7890'

async def main():
    async with aiohttp.ClientSession() as client:  # 相当于 requests.Session()
        html=await client.post('https://docs.aiohttp.org/en/stable/',headers=headers)
        print(await html.text())


asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())  # 这个防止windows不支持
asyncio.run(main())